package com.liyongjian.xhban.dal;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import com.liyongjian.xhban.model.BlogMedia;

public interface BlogMediaRepository extends PagingAndSortingRepository<BlogMedia, Long> {


    @Query("select t.url from BlogMedia t where t.blogId=:blogId and t.state=1")
    List<String> findUrlByBlogId(@Param("blogId") Long blogId);

}
